import { defineConfig, loadEnv } from 'vite';
import vue from '@vitejs/plugin-vue';

// https://vitejs.dev/config/
export default ({ mode }) =>
  defineConfig({
    plugins: [vue()],
    server: {
      proxy: {
        '/devServer': {
          target: 'https://kamy-yfy.xyz:6060',
          ws: true,
          changeOrigin: true,
          rewrite: (path) => path.replace(/^\/devServer/, ''),
        },
      },
    },
  });
